#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:zbsilent
import copy

"""
This is ClassType list or Arrays.

CLassType:
    
    
"""
_user_name = "ChenDu ZhenZhou HuaShan"
_array_user_name = _user_name.split(" ")
_int_len = len(_array_user_name) - 1  # get length with array

_float_str = 201823.234234
print(type(_float_str))
print(_float_str / 2)

"""
This is delete data in arrays .

delete Method:

    _array_user_name.remove("ChenDu")
    del _array_user_name[1]
    _array_user_name.pop(2) .
    
Add and insert,update Method:

    _array_user_name.append("China")  # add data
    _array_user_name.insert(2, "American")  # insrt data
    _array_user_name[2] = "XieDi"  # update data
    
Query Method:
    print(_array_user_name)
    print(_array_user_name[1:3])  # get index 0 - 3 but e  Does  not  contain index 3
    print(_array_user_name[2])
    print(_int_len)
    print(_array_user_name[_int_len])
    print(_array_user_name[-1])   # get index end
    print(_array_user_name[-2:])
    print(_array_user_name[:3])  # index 1 is zero you can  ignore this.
    _array_user_name.index("ChenDu") 
    _array_user_name.count("ChenDu") is query obj have count
    
Other Method：
    _array_user_name.reverse() is reverse # 反转
    _array_user_name.sort() is sort # 排序
    _array_user_name.extend(_user_pass) # 合并
    _array_user_name.copy() # 复制  浅copy
    
Fun Copy：
    You must import copy package
    Copy.copy like list copy #浅copy 
    list() # 工厂函数实现
    copy.deepcopy is fully copy
    
tuple 元组:
   
    不可变列表，只读 count/index 方法
    不可被改变
"""
# _append_str = ["fff", "ccccD"]
# _array_user_name.append(_append_str)
# _array_user_name2 = _array_user_name.copy()
# _copy_user = copy.deepcopy(_array_user_name)
# _array_user_name[2] = "dxy"
# _array_user_name2[3][0] = "ddd"
#
# print(_array_user_name)
# print(_array_user_name2)
# print(_copy_user)
#
# for i in _array_user_name[::2]:
#     print(i)

# 浅copy 用于 联合账号
_prersion = ["Name", ["建设银行", "农业银行"], 1]

_prersion_1 = _prersion[:]
_prersion_2 = _prersion[:]

_prersion_1[0] = "Albret"

_prersion_2[0] = "Silent"

_prersion_1[1][1] = 50
print(_prersion_1)
print(_prersion_2)

_tuple_str = ("1", 2)

print(type(_tuple_str))
